Skip to content

Conversation

SunguckLee
Copy link

@SunguckLee SunguckLee commented May 30, 2017

Add range search feature on full text search (original version has only exact match)

For CJK language, mongodb does not support stemmer for full text search.
Also not easy to implement stemmer for those language (Especially Korean).
So we usually use N-gram parser for full text search not supported mongodb yet.

Fortunately in Korean, we use space character between words and Korean(and also Japanese) use only suffix not prefix. So we can use mongodb full text search if mongodb support prefix match in fulltext. So I propose this simple feature.

Match range of original fulltext search
* '한글' <= match_range <= '한글'
* '테스트' <= match_range <= '테스트'
* '이성' <= match_range <= '이성'
* '한' <= match_range <= '한'

Match range of patched fulltext search
* '한글' <= match_range < '한긁'
* '테스트' <= match_range < '테스특'
* '이성' <= match_range < '이섲'
* '한' <= match_range < '핝'

I hope user can control this search mode (exact or prefix match) by query parameter or internal parameter.

Add range search feature on full text search (original version has only exact match)

>> Match range of original fulltext search
    * '한글' <= match_range < '한글'
    * '테스트' <= match_range < '테스트'
    * '이성' <= match_range < '이성'
    * '한' <= match_range < '한'

>> Match range of patched fulltext search
    * '한글' <= match_range < '한긁'
    * '테스트' <= match_range < '테스특'
    * '이성' <= match_range < '이섲'
    * '한' <= match_range < '핝'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant